﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZBJF.Warranty.Common.Enums.InsuranceProducts;
using ZBJF.Warranty.Model;
using ZBJF.Warranty.Model.ViewModel.InsuranceProducts;
using ZBJF.Warranty.Model.ViewModel.Sellers;

namespace ZBJF.Warranty.IBLL
{
    public partial interface ISellerInsuranceProductsService
    {
        SellerInsuranceProducts LoadById(long sllerInsuranceProductsId);
        bool IsExist(string productName, long id = 0);
        IQueryable<SellerInsuranceProducts> GetPagingList(SellerInsuranceProductsModel model, out int total);

        /// <summary>
        /// 获取销售商产品可承保条件信息
        /// </summary>
        /// <param name="sellerCode">销售商编码</param>
        /// <param name="sellerInsuranceProductsCode">销售商产品编码</param>
        /// <returns></returns>
        SellerInsuranceProductsAvailableInfo GetAvailableInfo(string sellerCode, string sellerInsuranceProductsCode);

        /// <summary>
        /// 判断投保信息是否可承保
        /// </summary>
        /// <param name="sellerCode">销售商编码</param>
        /// <param name="sellerInsuranceProductsId">销售商产品ID</param>
        /// <param name="modelId">型号ID</param>
        /// <param name="equipmentPrice">设备价格</param>
        /// <param name="screenTypeCode">屏幕类型</param>
        /// <param name="message">错误消息</param>
        /// <returns></returns>
        bool VerifyAcceptable(string sellerCode, long sellerInsuranceProductsId, long modelId, decimal equipmentPrice, byte screenTypeCode, out string message);

        /// <summary>
        /// 获取销售商产品ID
        /// </summary>
        /// <param name="sellerInsuranceProductsCode">销售商产品编码</param>
        /// <returns></returns>
        SellerInsuranceProductsInfo GetSellerInsuranceProductsId(string sellerInsuranceProductsCode);
    }
}
